﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class cn_kgarden : System.Web.UI.Page
{
    protected string _cid = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        _cid = Request.QueryString["cid"];
        if (string.IsNullOrEmpty(_cid))
        {
            _cid = ColumnHelp.GetFirstColumnId(7);
        }
        else
        {
            if (!Whir.Common.WebHelper.Utils.IsInt(_cid))
                _cid = ColumnHelp.GetFirstColumnId(7);
        }
        Control str2 = null;
        if (string.IsNullOrEmpty(Request.QueryString["cid"]))
        {
            str2 = this.LoadControl("common/menu_leftnews.ascx");
        }
        else
        {
            str2 = this.LoadControl("common/menu_leftnews.ascx");
            //str2 = this.LoadControl("common/menu_file.ascx");
        }
        Panel2.Controls.Add(str2);

        if (!IsPostBack)
        {
            GetTipsInfo();
            GetSinglePageInfo();
        }
    }

    private void GetSinglePageInfo()
    {
        string url = string.Format("news.aspx?cid={0}&mode=kgarden", _cid);
        ColumnHelp.getReader(_cid, url, ColumnHelp.ModuleMarkMode.List);
        ltrContent.Text = ColumnHelp.GetSinglePageContent(_cid);
    }

    private void GetTipsInfo()
    {
        ltrTips.Text = ColumnHelp.GetColumnName(_cid);
    }

}
